{% extends 'course-manage/tasks/layout.html.twig' %}
{% do script(['libs/jquery-sortable.js','app/js/course-manage/lesson-manage/default/index.js']) %}

{% block page_title %}{{ 'course.plan_task.content_title'|trans }}{% endblock %}
{% block main_body %}
  {% include 'lesson-manage/header.html.twig' with {taskMode:'lesson'}  %}
  <ul id="sortable-list" class="task-manage-list sortable-list" data-sort-url='{{ path("course_manage_items_sort",{courseId: course.id}) }}'>
    {% for key, item in items %}
      {% if item.type == 'lesson' %}
        {% include 'lesson-manage/default/lesson.html.twig' with {lesson: item} %}
      {% else %}
        {% include 'lesson-manage/chapter/item.html.twig' with {chapter:item, course:course} %}
      {% endif %}
    {% endfor %}
  </ul>
  <div class="empty task-empty js-task-empty {% if items %} hidden {% endif %}">
    <i class="es-icon es-icon-book task-empty-icon"></i>
    {{'course.plan_task.empty'|trans}}
  </div>
{% endblock %}
